#include<bits/stdc++.h>
 using namespace std;
 int main(){
	freopen("duel,in","r",stdin);
	freopen("duel,out","w",stdout);
	ios::sync_with_stdio(false);
	int n,cnt=0,a[100005];
	cin>>n;
	for(int i=1; i<=n; i++){
        cin>>a[i];
	}
	for(int i=1; i<=n; i++){
            if(a[i]==a[i+1]){
                continue;
            }
            for(int j=i+1; j<n; j++){
                if(a[i]==a[j]){
                    cnt++;
                }
            }
	}
	cout<<cnt+1<<endl;
	fclose(stdin);
	fclose(stdout);
	return 0;
 }
